package com.mgear.ldap.service;

public class ContactServicesProxy implements com.mgear.ldap.service.ContactServices {
  private String _endpoint = null;
  private com.mgear.ldap.service.ContactServices contactServices = null;
  
  public ContactServicesProxy() {
    _initContactServicesProxy();
  }
  
  public ContactServicesProxy(String endpoint) {
    _endpoint = endpoint;
    _initContactServicesProxy();
  }
  
  private void _initContactServicesProxy() {
    try {
      contactServices = (new com.mgear.ldap.service.ContactServicesServiceLocator()).getContactServicesPort();
      if (contactServices != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)contactServices)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)contactServices)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (contactServices != null)
      ((javax.xml.rpc.Stub)contactServices)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public com.mgear.ldap.service.ContactServices getContactServices() {
    if (contactServices == null)
      _initContactServicesProxy();
    return contactServices;
  }
  
  public java.lang.String getUserContacts(java.lang.String arg0, java.lang.String arg1) throws java.rmi.RemoteException, com.mgear.ldap.service.Exception{
    if (contactServices == null)
      _initContactServicesProxy();
    return contactServices.getUserContacts(arg0, arg1);
  }
  
  public java.lang.String getUsersByDeptNO(java.lang.String arg0) throws java.rmi.RemoteException, com.mgear.ldap.service.Exception{
    if (contactServices == null)
      _initContactServicesProxy();
    return contactServices.getUsersByDeptNO(arg0);
  }
  
  
}